package com.hx.portal.controller.user;

import com.hx.common.exception.CustomerException;
import com.hx.common.result.Result;

import com.hx.hospital.pojo.Question;
import com.hx.hospital.service.QuestionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import io.swagger.annotations.Authorization;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/question")
@RestController
@ResponseBody
@Api(description = "问题反馈相关接口文档")
public class QuestionController {

    @Reference
    private QuestionService questionService;

    @PostMapping(value = "/insert")
    @ApiOperation(value = "问题反馈添加",notes = "问题反馈添加",httpMethod = "POST",authorizations = {@Authorization(value = "token")})
    public Result sendQuestion(@RequestBody Question question,String token) throws CustomerException {
        questionService.insertQuestion(question,token);
        return new Result();
    }

}
